package com.sikaryofficial.backend.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sikaryofficial.backend.domain.dto.req.information.ArticleEvaluateReplyListReq;
import com.sikaryofficial.backend.domain.dto.req.store.StoreCommentReplyListReq;
import com.sikaryofficial.backend.domain.dto.resp.StoreCommentReplyDTO;
import com.sikaryofficial.backend.domain.dto.resp.information.ArticleEvaluateReplyDTO;
import com.sikaryofficial.backend.domain.entity.StoreCommentReply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sikaryofficial.backend.domain.vo.EvaluateReplyCount;
import com.sikaryofficial.backend.domain.vo.store.CommentReplyCount;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface StoreCommentReplyMapper extends BaseMapper<StoreCommentReply> {

	/**
	 * 根据评论ID查询回复数量
	 * @param commentIds 评论ID列表
	 * @param userId 用户ID
	 * @return 回复数量
	 */
	List<CommentReplyCount> countByCommentId(@Param("commentIds") List<Long> commentIds, @Param("userId") Long userId);

	IPage<StoreCommentReplyDTO> replyList(Page<StoreCommentReplyDTO> customerPage,
	                                      @Param("req") StoreCommentReplyListReq req, @Param("userId") Long userId);

	List<StoreCommentReplyDTO> queryByCommentId(@Param("commentIds") List<Long> commentIds,
	                                                @Param("limitNum") int limitNum, @Param("userId") Long userId);

}
